
export const transData = (originData) => {

  return originData.map((item, index) => {
    const newItem = {}
    newItem['lid'] = item['编号']
    newItem['createTime'] = item['创建时间']
    newItem['jobName'] = item['职位']
    newItem['salaryDesc'] = item['薪资']
    newItem['category'] = item['类目']
    newItem['areaDistrict'] = item['一级区域']
    newItem['businessDistrict'] = item['二级区域']
    newItem['brandName'] = item['公司']
    newItem['url'] = item['链接']
    newItem['key'] = item['编号']
    newItem['group'] = item['状态']
    newItem['submitStatus'] = item['进度']
    newItem['detail'] = item['detail']
    newItem['targetGroup'] = item['targetGroup']
    newItem['weight'] = item['weight']
    

    return newItem
  })
}

export const createJobFilter = (filters) => {
  return (item) => {
    const isJobName = !filters.jobName || item['jobName'].includes(filters.jobName)

    return isJobName
  }
}

export const createGroupFilter = (filters) => {
  return (item) => {
    return item['group'] == filters.group
  }
}